package com.lyx.objectio;

import java.io.*;
import java.util.Date;

public class TestObjectStream {

    public static void write() throws IOException {
        OutputStream os = new FileOutputStream("c:/e.txt");
        BufferedOutputStream bos = new BufferedOutputStream(os);
        ObjectOutputStream oos = new ObjectOutputStream(bos);

        oos.writeInt(12);
        oos.writeBoolean(true);
        oos.writeObject(new Date());

        oos.close();
        bos.close();
        os.close();

    }

    public static void read(){

    }



}
